DOORS script DB error

I am so frustrated about my code, cuz it kept telling me the error:

-E- DXL: <Line:99> syntax error
-E- DXL: <Line:180> incorrectly concatenated tokens
-E- DXL: <Line:180> undeclared variable (doExcelExportToolTab)
-I- DXL: All done. Errors reported: 3. Warnings reported: 0.


doExcelExportToolTab is a methond name. I dont know how to fix this bug and go ahead implementing more functions.

 

Can anyone help me? RELLY APPRECIATE your response!!!!!!

I was trying to have a DB with 4 tabs.

 

 

 

pragma runLim, 0
#include <utils/ole.inc>
#include <utils/doctools/itfutil.inc>
checkPlatform (NLS_("aMicrosoft Excel"))

string pathstring[100] = null
int numOfModule = 0
string baselinestring = null

DB excelExportDB = null
DBE excelExportTabDBE

const string tabStrings[] = {"Export Tool", "Export Info", "Filters For Attributes","Filters For Links"}

Skip excelExportTabSkip
Skip excelExportToolTabSkip
Skip excelExportInfoTabSkip
Skip excelFiltersAttrTabSkip
Skip excelFiltersLinksSkip



/************************************  
    processFormal  
   
    Do something with the given formal module.  
************************************/
void processFormal(string mName)  
{  
    pathstring[numOfModule] = mName
    numOfModule++
}    
/************************************  
    processFolder  
   
    Do something with the given folder.  

     
/************************************  
    scanFolder  
   
    This function scans all items in the given folder, recursing through  
    sub-projects and folders.   
   
    One of the process functions, defined above, is called according to the  
    type of the item.  
************************************/
void scanFolder(Folder f)  
{  
    Item itm  
   
    if (null f)  
    {  
        print("NULL Folder parameter passed")  
        return  
    }  
   
    // loop through items at top level of folder  
    for itm in f do
    {  
        // sensible checks to avoid run-time errors  
        if (null itm) continue
        if (isDeleted(itm)) continue
        if (type (itm) == "Folder")  
         {  
             // scan items in the folder  
             scanFolder(folder(itm))  
         } else if (type (itm) == "Project")
        { // scan items in the project
            scanFolder(folder(itm))
        }
         else if (type (itm) == "Formal")   
         {
             // do something with formal module  
             processFormal(fullName(itm))  
         }  
     }  
 }  



Folder f = current Folder
scanFolder(f)
string paths[numOfModule] = null
for (i = 0;i<numOfModule;i++){
    paths[i]=pathstring[i]}
sort paths

void excelExportTabSelectFn( DBE theTab ) {
   int selection = get( theTab )
   showSelectedTab( excelExportTabSkip, selection )
}



********************************************************************************************************************************


void doExcelExportToolTab(DB excelExportDB, DBE excelExportTabDBE,Skip excelExportToolTabSkip){
    DBE showpath = multiList(excelExportDB, "Formal Module Paths Under Current Folder """fullName(f)":", 450, 38, paths)
    DBE stringIn = field(excelExportDB, "Path:", "",70)
    DBE showbaseline = text(excelExportDB, "Baselines", null, 400, 300, true)
    DBE errorLog = text(excelExportDB,"Error Log", null, 400,140,true)

    showpath->"top"->"inside"->excelExportTabDBE
    showpath->"left"->"inside"->excelExportTabDBE
    showpath->"right"->"unattached"
    showpath->"bottom"->"inside"->excelExportTabDBE
    
    stringIn->"top"-> "inside"->excelExportTabDBE
    stringIn->"left"->"spaced"->showpath
    stringIn->"right"->"inside"->excelExportTabDBE

    showbaseline->"top"->"spaced"->stringIn
    showbaseline->"right"->"inside"->excelExportTabDBE
    showbaseline->"left"->"spaced"->showpath

    errorLog->"top"->"spaced"->showbaseline
    errorLog->"right"->"inside"->excelExportTabDBE
    errorLog->"left"->"spaced"->showpath
    errorLog->"bottom"->"inside"->excelExportTabDBE

    int index = 0

       put( excelExportToolTabSkip , index++, showpath)
       put( excelExportToolTabSkip , index++, stringIn)
       put( excelExportToolTabSkip , index++, showbaseline)
       put( excelExportToolTabSkip , index++, errorLog)
       
}
void doExcelExportInfoTab(DB excelExportDB, DBE excelExportTabDBE,Skip excelExportInfoTabSkip){
    DBE testing = text(excelExportDB,"Testing",null,100,100,true)
    testing ->"top"->"inside"->excelExportTabDBE
    testing ->"left"->"inside"->excelExportTabDBE
    testing ->"right"->"inside"->excelExportTabDBE
    testing ->"bottom"->"inside"->excelExportTabDBE

    put( excelExportInfoTabSkip , 0, testing )

}
void doExcelFiltersAttrTab(DB excelExportDB, DBE excelExportTabDBE,Skip excelFiltersAttrTabSkip){
    DBE testing = text(excelExportDB,"Testing",null,100,100,true)
    testing ->"top"->"inside"->excelExportTabDBE
    testing ->"left"->"inside"->excelExportTabDBE
    testing ->"right"->"inside"->excelExportTabDBE
    testing ->"bottom"->"inside"->excelExportTabDBE

    put( excelFiltersAttrTabSkip , 0, testing )
}
void doExcelFiltersLinksTab(DB excelExportDB, DBE excelExportTabDBE,Skip excelFiltersLinksSkip){
    DBE testing = text(excelExportDB,"Testing",null,100,100,true)
    testing ->"top"->"inside"->excelExportTabDBE
    testing ->"left"->"inside"->excelExportTabDBE
    testing ->"right"->"inside"->excelExportTabDBE
    testing ->"bottom"->"inside"->excelExportTabDBE

    put( excelFiltersLinksSkip , 0, testing )
}


/***********************
        UI
************************/
void makeExcelExportUI(){

   if ( null excelExportDB ) {

      excelExportDB = create( "Enhanced DOORS Export",  styleCentered )

      excelExportTabSkip = create

      excelExportTabDBE = tab( excelExportDB,
                               tabStrings,
                               200,
                               300,
                               excelExportTabSelectFn
                             )

      excelExportToolTabSkip = create
      doExcelExportToolTab( excelExportDB, excelExportTabDBE, excelExportToolTabSkip)
      put( excelExportTabSkip, 0, excelExportToolTabSkip)

      excelExportInfoTabSkip = create
      doExcelExportInfoTab ( excelExportDB, excelExportTabDBE, excelExportInfoTabSkip )
      put( excelExportTabSkip, 1, excelExportInfoTabSkip )

      excelFiltersAttrTabSkip = create
      doExcelFiltersAttrTab( excelExportDB, excelExportTabDBE, excelFiltersAttrTabSkip )
      put( excelExportTabSkip, 2, excelFiltersAttrTabSkip )

      excelFiltersLinksSkip = create
      doExcelFiltersLinksTab( excelExportDB, excelExportTabDBE, excelFiltersLinksSkip )
      put( excelExportTabSkip, 3, excelFiltersLinksSkip )

      //label( excelExportDB, "" )

      //exportButtonDBE = apply( excelExportDB, exportButtonLabel, exportModuleToExcel )

      //excelTrigger = trigger( module, close, 10, closeModuleTrig )

      showSelectedTab( excelExportTabSkip, 0 )

      //close( excelExportDB, true, closeDB )
      
      realize excelExportDB
   }

   showSelectedTab( excelExportTabSkip, 0 )
   block excelExportDB
}

 /************************************  
     MAIN  
 ************************************/

//exportPreChecks( current Module )

makeExcelExportUI


JingC - Wed Sep 04 16:41:26 EDT 2013

Re: DOORS script DB error
adevicq - Thu Sep 05 03:44:40 EDT 2013

Hi,

There is a line of "*" just before the declaration of "doExcelExportToolTab". I think thet the problem should be here...

regards,

alain

 

Re: DOORS script DB error
llandale - Thu Sep 05 10:58:56 EDT 2013

adevicq - Thu Sep 05 03:44:40 EDT 2013

Hi,

There is a line of "*" just before the declaration of "doExcelExportToolTab". I think thet the problem should be here...

regards,

alain

 

Yes.  "syntax errors" (line 99) are usually because of the previous line.  Make the asterisks a comment: //********

Line 30 gets "array bounds exceeded(100) when the folder has more than 100 modules in it.

Either check to make sure you have reached max 100 modules, or count the modules first and THEN declare "pathstring[]" at that size.  However, you could forgo that; declar you multiList, realize the dialog, and THEN insert all the modules.

-Louie